﻿<Window x:Class="MoonyDesk.SettingsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:MoonyDesk"
        Title="MoonyDesk Settings" 
        Height="300" 
        Width="500"
        Icon="moony.ico"
        WindowStartupLocation="CenterScreen"
        ResizeMode="NoResize"
        Closing="Window_Closing">
    <Window.Resources>
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid SnapsToDevicePixels="True" Background="Transparent">
                            <Border 
                                x:Name="BorderSelected"
                                BorderThickness="1,1,0,1" 
                                BorderBrush="#999"
                                Background="White"
                                Margin="0,0,-1,0"
                                Visibility="Hidden"></Border>
                            <Border 
                                x:Name="BorderHover"
                                Background="#93D2FF"
                                Visibility="Hidden"></Border>
                            <ContentPresenter
                                VerticalAlignment="Center"
                                HorizontalAlignment="Left"
                                ContentSource="Header"
                                Margin="4" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter TargetName="BorderSelected" Property="Visibility" Value="Visible" />
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="Border.IsMouseOver" Value="True" />
                                    <Condition Property="IsSelected" Value="False" />
                                </MultiTrigger.Conditions>
                                <Setter TargetName="BorderHover" Property="Visibility" Value="Visible" />
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type TabControl}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabControl}">
                        <Grid SnapsToDevicePixels="True">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Border Grid.Column="0" Panel.ZIndex="2" Margin="4,60,0,4">
                                <StackPanel
                                    Orientation="Vertical"
                                    Panel.ZIndex="1" 
                                    IsItemsHost="True"
                                    HorizontalAlignment="Left" />
                            </Border>
                            <Border Grid.Column="0" Background="#EDF1F4"></Border>
                            <Border 
                                Grid.Column="1"
                                BorderThickness="1,0,0,0"
                                BorderBrush="#999"
                                Background="White">
                                <ContentPresenter ContentSource="SelectedContent" />
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <TabControl x:Name="tabControl">
        </TabControl>
    </Grid>
</Window>
